package com.ruicar.afs.cloud.afscase.credittemplate.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruicar.afs.cloud.afscase.credittemplate.entity.CreditTemplate;
import com.ruicar.afs.cloud.afscase.credittemplate.mapper.CreditTemplateMapper;
import com.ruicar.afs.cloud.afscase.credittemplate.service.CreditTemplateService;
import com.ruicar.afs.cloud.common.modules.afscorebusiness.enums.RoleConfigurationEnum;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jiaqi.guo
 * @version 1.0
 * @created 2020/5/19 11:44
 */
@Service("CreditTemplateService")
public class CreditTemplateServiceImpl extends ServiceImpl<CreditTemplateMapper, CreditTemplate> implements CreditTemplateService {

    /**
     * enum常量配置
     */
    public String queryResult(List roleCodeList) {
        String bool = "false";
        for (int i = 0; i < roleCodeList.size(); i++) {
            //获取enum常量配置
            String[] codeStr = RoleConfigurationEnum.getCodeList();
            for (int j = 0; j < codeStr.length; j++) {
                if ((roleCodeList.get(i)).equals(codeStr[j])) {
                    bool = "true";
                }
            }
        }
        return bool;
    }
}
